name = "小明"
age = 18
height = 180

print("name:%s,age:%d,height:%.1f"%(name, age, height))
print(f"name:{name},age:{age},height:{height}")


# 位置传入
str = "名字:{},年龄:{},身高:{}".format(name,age,height)
print(str)


# 通过下标
str = "名字:{0},年龄:{1},身高:{2}".format(name,age,height)
print(str)